<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>客户列表页</title>
</head>
<body>

<table>
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>地址</th>
        <th>电话</th>
        <th>邮箱</th>
        <th>用户状态</th>
        <th>备注</th>
        <th>添加时间</th>
        <th>更新时间</th>
        <th>修改信息</th>
        <th>删除信息</th>
    </tr>
    <tr th:each="customer:${customerList}">
        <td th:text="${customer.id}"></td>
        <td th:text="${customer.name}"></td>
        <td th:text="${customer.address}"></td>
        <td th:text="${customer.telephone}"></td>
        <td th:text="${customer.email}"></td>
        <td th:text="${customer.status ge 0 } ? 正常: 已被锁定"></td>
        <td th:text="${customer.remark}"></td>
        <td th:text="${#dates.format(customer.createTime, 'yyyy-MM-dd hh:mm:ss')}"></td>
        <td th:text="${#dates.format(customer.updateTime, 'yyyy-MM-dd hh:mm:ss')}"></td>
        <td><a th:href="@{'/get?id=' + ${customer.id}}" target="_blank">修改</a></td>
        <td>
            <form id="_form" method="post" action="/customer/remove">
                <input type="hidden" name="id" th:value="${customer.id}" />
                <a onclick="document.getElementById('_form').submit();">删除</a>
            </form>
        </td>
    </tr>
</table>
</body>
</html>